<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            width: 300px;
            height: 300px;
            border: 1px solid blue;
        }
        /* ::before选择器权重为1 */
        /* content---属性不能少 */
        div::before {
            display: inline-block;
            content: '我';
            width: 120px;
            height: 100px;
            background-color: brown;
        }
        div::after {
            display: inline-block;
            text-align: center;
            
            content: '小猪佩奇';
            width: 120px;
            height: 100px;
            background-color: paleturquoise;
        }
    </style>
</head>
<body>
    <div>是</div>
</body>
</html>